home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / qw12inst.zip / EDLIN.TEC < prev    next >
Text File  |  1991-12-04  |  10KB  |  247 lines

  1. ID:ED How to edit your DOS files.
  2. A Quarterdeck Technical Note #209
  3. by Bob Perry
  4.  
  5.      Our Technical Support Team has determined that a modification
  6. of your computer's "boot-up" files is necessary to correct a
  7. conflict your system has been experiencing. The two "boot-up" files
  8. used by DOS are the System Configuration File, CONFIG.SYS, and the
  9. System Startup Batch File, AUTOEXEC.BAT.  After the following
  10. preliminary questions have been answered, you should be able to
  11. modify these two files following the prescription of our
  12. technician.
  13.  
  14. Q.What are the CONFIG.SYS and AUTOEXEC.BAT files?
  15.  
  16.      Both the CONFIG.SYS and AUTOEXEC.BAT files are ASCII text
  17. files that DOS processes when your system is turned on or
  18. restarted.  They are found in the root directory of your boot
  19. drive. (For most DOS machines with a hard disk, C:\ is the drive 
  20. designation of the boot drive).  CONFIG.SYS allows you to 
  21. configure certain aspects of DOS, such as installing device 
  22. drivers for memory management.  AUTOEXEC.BAT is an optional batch 
  23. file (although almost everyone uses it) containing a series of 
  24. DOS commands, which may include the installation of TSR 
  25. (Terminate and Stay Resident) utilities, or configuration and 
  26. enhancement features.
  27.  
  28. Q.What programs are used to modify the CONFIG.SYS or AUTOEXEC.BAT?
  29.  
  30.      There are three ways to modify a text file like your
  31. CONFIG.SYS and AUTOEXEC.BAT files.  
  32.      1-Use your word processor.
  33.      2-Use simple DOS commands.
  34.      3-Use the EDLIN program in DOS.
  35.  
  36.      Although it is probably much easier to use your own favorite
  37. word processor, like WordPerfect or DESQview Notepad, to edit your
  38. system configuration files, simple DOS commands like COPY, TYPE,
  39. and REN can be used.  Also, DOS contains a "line editor" known as
  40. EDLIN which can be used to create and edit more elaborate text
  41. files.  EDLIN is a bit more cumbersome to use than most word
  42. processing programs. Hence, it may be faster to learn how your own
  43. word processor edits a DOS text file (also known as an ASCII file,
  44. or Nondocument mode) than to use EDLIN. 
  45.  
  46. Q.How can simple DOS commands help modify my files?
  47.  
  48.      Another way to edit your CONFIG.SYS or AUTOEXEC.BAT file is to
  49. use simple DOS commands. In this example we will assume it is
  50. necessary to make a change to your CONFIG.SYS file. First, you
  51. should determine the location of the file. It is usually found in
  52. the root directory of your hard disk.  To be certain it is  present
  53. in the root, change directories to the root and type: 
  54.  
  55. C:\>DIR CONFIG.SYS (and hit Enter) 
  56. You should see a message displayed indicating the size, the date,
  57. and the time your CONFIG.SYS file was created. like this:
  58.  
  59. C:\>DIR CONFIG.SYS
  60.  
  61.      Volume in drive C is (your label)
  62.      Directory of  C:\
  63.  
  64.     CONFIG   SYS      114  12-03-90  11:18a        1 File(s)  
  65.                     5746688 bytes free
  66.  
  67. C:\>
  68.  
  69. Next, just to be on the safe side, you should make a backup copy of
  70. your CONFIG.SYS file. This is so that if you need to recall any of
  71. it's contents it will still be available to you.  To do this, use
  72. the DOS REName command:
  73.  
  74. C:\>REN CONFIG.SYS CONFIG.OLD.  
  75.  
  76. This will rename your CONFIG.SYS file to CONFIG.OLD.  To view the
  77. contents of your old file, enter: 
  78.  
  79. C:\>TYPE CONFIG.OLD
  80.  
  81. All the lines in the file will be displayed on the screen.
  82.  
  83. To create a new CONFIG.SYS file with the changes prescribed by our
  84. Technical Support specialist, use the DOS COPY CON command, as in
  85. this example: 
  86.  
  87. C:\>COPY CON CONFIG.SYS 
  88.  
  89. The cursor will move to the next line indicating that it is ready 
  90. for you to create the first line of text in the new CONFIG.SYS 
  91. file.  Following the advice of the support specialist, various 
  92. items can be created on this and successive lines.  Accurately 
  93. type the information for each line and hit Enter.  When all the 
  94. proper lines have been typed, hit Enter once more to move the 
  95. cursor to the line below your new file. Note that the backspace 
  96. key can be used to correct a typing mistake, but you cannot go 
  97. back to a line once you've pressed Enter.  At his point type ^Z, 
  98. or your function-6 key (F6) and then Enter.  You should see: 
  99.  
  100. ^Z
  101. "1 File(s) copied" 
  102.  
  103. This confirms your file has been saved to disk.  You should use 
  104. the DOS TYPE command to be sure:
  105.  
  106. C:\>TYPE CONFIG.SYS
  107.  
  108. Q.How is EDLIN used?
  109.      Another way to edit your files is to use EDLIN. The EDLIN 
  110. program is used from the command line, or DOS prompt.  The proper 
  111. syntax is: EDLIN [drive:][path]filename. Note that the drive and 
  112. path are optional. The filename parameter specifies which text 
  113. file you want to edit, if the file does not already exist EDLIN 
  114. will create it. You reference text by its line number, which 
  115. EDLIN displays for convenience.  Each line can be a maximum of 
  116. 253 characters, and you may have from 1 to 65,534 lines in a 
  117. file. Once the file is created or loaded, EDLIN displays its 
  118. asterisk prompt (*) and you can begin to enter commands.
  119.  
  120.      EDLIN commands are single characters which may be either upper
  121. or lower case, and are preceded by one or more line numbers.  The
  122. EDLIN commands you will use to modify your CONFIG.SYS or
  123. AUTOEXEC.BAT files are:
  124.  
  125.      COMMAND:       MEANING:
  126.      --------       --------
  127.      linenumber     selects a line of text for editing
  128.      D              deletes one or more lines
  129.      E              end; saves the file to disk and exits EDLIN
  130.      I              inserts new lines
  131.      L              lists or displays one or more lines     
  132.      Q              quit; ends session without saving file  
  133.      F3             copies all characters of the old line to the 
  134.                     new line 
  135.  
  136.      For example, if you must edit your CONFIG.SYS file you should
  137. first make a backup using the DOS REN command:
  138.  
  139. C:\>REN CONFIG.SYS CONFIG.OLD
  140.  
  141. Now you can begin to use EDLIN to create a new CONFIG.SYS:
  142.  
  143.      C:\>EDLIN CONFIG.SYS
  144.  
  145. Edlin will then display:      C:\>EDLIN CONFIG.SYS
  146.                               End of input file
  147.                               *
  148.  
  149. At EDLIN's asterisk prompt, you should list the contents of your
  150. CONFIG.SYS file so that the line numbers (followed by colons, ":")
  151. are displayed.  Use the "L" command, as follows:
  152.  
  153. C:\>EDLIN CONFIG.SYS
  154.      End of input file
  155.      *L
  156.         1: DEVICE=C:\QEMM\QEMM386.SYS RAM
  157.         2: device=c:\qemm\loadhi.sys c:\mouse\ktmouse.sys /1
  158.         3: files=20
  159.         4: buffers=1
  160.         5: stacks=0,0
  161.      *
  162.  
  163. To edit a line you must type the linenumber and hit Enter at the
  164. asterisk prompt. Let's say your technician has recommended that you
  165. add the exclusion parameter, X=F000-F7FF, to your QEMM line.  You
  166. only need to type "1" and press Enter to edit line 1.  Simply type
  167. in the new line at the asterisk below the original text.  When a 
  168. simple parameter has been recommended by your technician's 
  169. prescription, EDLIN's F3 key is a very convenient way to display 
  170. the entire contents of the original line.  F3 is also a good way 
  171. to prevent typographical errors.  Then, all you need to do is 
  172. backspace to the correct spot and type in your recommended 
  173. parameter:
  174.  
  175. C:\>EDLIN CONFIG.SYS
  176. End of input file
  177. *L
  178.         1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
  179.         2: device=c:\qemm\loadhi.sys c:\mouse\ktmouse.sys /1
  180.         3: files=20
  181.         4: buffers=1
  182.         5: stacks=0,0
  183. *1
  184.         1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
  185.      1: (pressing F3 at this point displays the entire line 
  186.                above for your convenience)
  187.         1:*DEVICE=C:\QEMM\QEMM.SYS X=F000-F7FF RAM
  188. *
  189.  
  190. Finally you must type "E" to save your new file to disk and exit
  191. EDLIN.  Here is how this looks on the screen:
  192.  
  193. C:\>EDLIN CONFIG.SYS
  194. End of input file
  195. *L
  196.         1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
  197.         2: device=c:\qemm\loadhi.sys c:\mouse\ktmouse.sys /1
  198.         3: files=20
  199.         4: buffers=1
  200.         5: stacks=0,0
  201. *1
  202.         1:*DEVICE=C:\QEMM\QEMM386.SYS RAM
  203.         1:*DEVICE=C:\QEMM\QEMM.SYS X=F000-F7FF RAM
  204. *E
  205.  
  206. C:\>
  207. Use the DOS TYPE command to view the changes you have made:
  208.  
  209. C:\>TYPE CONFIG.SYS 
  210.  
  211. Q.What have we accomplished?
  212.  
  213.      Three different methods for editing your system's "boot-up"
  214. files have been described. You should take your choice of the 
  215. method that makes it easiest for you to follow the advice given 
  216. by our technician.  For more detailed information on the subject of
  217. editing DOS text files, consult:
  218.  
  219.      a)  the company that sold you your copy of DOS
  220.      b)  your Word Processor's documentation regarding ASCII 
  221.           or DOS text files
  222.      c)  your DOS User Manual's section on the EDLIN utility, 
  223.           (which is often Chapter 8 or 10)
  224.      d)  The MS DOS Encyclopedia, by Microsoft Press, page 829   
  225.      e)  DOS Power Tools, by PC Magazine, page 233
  226.      f)  The New DOS 4.0, by Christopher, Feigenbaum, Saliga, 
  227.           John Wiley & Sons, page 75
  228.      g)  MS-DOS Bible, the Waite Group, H.W. Sams & Co, page 95.
  229.      h)  DOS The Complete Reference, K. Jamsa, Osborne/McGraw-
  230.           Hill, pages 403-452.
  231.  
  232.      When you edit your CONFIG.SYS or AUTOEXEC.BAT files don't 
  233. forget that you must reboot your computer to have the changes you 
  234. made take effect.  While it is not the responsibility of
  235. Quarterdeck to serve as your DOS tutor, consultant, or to support
  236. DOS's commands (since DOS is not a Quarterdeck product),  this
  237. technical bulletin is provided with the best interest of trying to
  238. get you started with useful DOS features.  Since you have now
  239. learned about your CONFIG.SYS and AUTOEXEC.BAT files and how they
  240. are modified, we are sure you are on your way to becoming more
  241. proficient in the use of your computer.
  242.  
  243.           Copyright (C) 1991 by Quarterdeck Office Systems
  244.                * * *   E N D   O F   F I L E    * * *
  245.  
  246.  
  247.